<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
  <meta content="yes" name=" apple-mobile-web-app-capable" />
  <!-- 隐藏状态栏  -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
  <!-- <title>点餐-确认订单</title> -->
  <link rel="stylesheet" href="css/common.css">
  <link rel="stylesheet" href="css/details.css">
  <link rel="stylesheet" href="css/order-food.css">
</head>
<body class="ng-cloak" ng-app="ConfirmOrder" ng-controller="ConfirmOrderCtrl">
<header>
    <div class="wrapper clearfix">
      <div class="login_fl fl">
        <a href="javascript:void(0)" ng-click="back()" class="login_icon"><img src="img/srh_icon.png" alt=""></a>
      </div>
      <h1>确认订单</h1>
    </div>
</header>
<section class="order-food">
  <div class="of-top">
    <div>
      <h2>餐点订单</h2>
      <p ng-show="params.ktvOrderNum != -1 && params.tableId > -1">已关联到您的订单{{params.tableName}}</p>
      <p ng-show="params.ktvOrderNum == -1 && params.tableId > -1">包厢号：{{params.tableName}}</p>
      <p ng-show="params.ktvOrderNum != -1 && params.tableId == -1">已关联到您的订单，包厢商家会为您指定</p>
    </div>
  </div>
  <div class="of-content">
    <ul>
      <li ng-repeat="Item in params.foodList">{{Item.foodName}} {{Item.foodNumber}} {{Item.unit}}</li>
    </ul>
  </div>
</section>
  
<!-- 红包选择 -->
<div class="coupon">
  <i></i>
  <span>红包</span>

  <!-- 有红包 还没选 -->
  <span class="fr" ng-if="CouponList.size !== 0 && !ticketValue  && userInfo.isUserLogin" ng-click='GetCoupon()'>还有{{CouponList.list.length}}个红包可用<b></b></span>

  <!-- 有红包 已选红包 -->
  <span class="fr" ng-if="CouponList.size !== 0 && ticketValue" ng-click='GetCoupon()'>减{{ticketValue == 0?total:ticketValue}}元<b></b></span>

  <!-- 没有红包 兑换券 -->
  <span class="fr" ng-if="CouponList.size == 0">无红包<b></b></span>

  <!-- 没有登录 -->
  <span class="fr" ng-if="!userInfo.isUserLogin">登录后使用<b></b></span>

</div>

<!-- 绑定手机号&用户备注 -->
<section class="m68">
  <div class="bind_phone">
    <span><i></i>手机号码</span>
    <span class="fr">{{params.userPhone?params.userPhone:'未登录'}}<!-- <i ng-show="params.userPhone != null"></i> --></span>
  </div>
  <div class="straight-line"></div>
  <div class="message">
    <textarea name="" id="" cols="38" rows="1" placeholder="您的特殊要求/口味/冷热/额外服务" ng-model="params.userMsg"></textarea>
  </div>
</section>

<!-- 确认预订 -->
<footer class="clearfix">

  <!-- 有红包 -->
  <p ng-if="CouponList.size !== 0 && (total - ticketValue) > 0 && tickerValue !== 0 && cType != 2">
    ¥{{ticketValue?total - ticketValue:total | number:2}}
    <span ng-if="ticketValue">已优惠{{ticketValue}}元</span>
  </p>

  <!-- 有红包 红包大于订单金额 -->
  <p ng-if="CouponList.size !== 0 && (total - ticketValue) <= 0 && cType != 2">¥ 0
    <span>已优惠{{ticketValue}}元</span>
  </p>

  <!-- 有兑换券红包 -->
  <p ng-if="CouponList.size !== 0 && cType == 2">¥ {{total - ticketValue | number:2 }}
    <span>已优惠{{ticketValue}}元</span>
  </p>

  <!-- 没有红包 -->
  <p ng-if="CouponList.size == 0">¥ {{total | number:2}}</p>
  
  <input type="button" value="确认预订" ng-click="submit()" ng-if="userInfo.isUserLogin">
  <input type="button" value="登录并继续" ng-click="submit()" ng-if="!userInfo.isUserLogin">

</footer>

<script src="js/jquery-1.11.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/angular.min.js"></script>
<script type="text/javascript" src="js/constants.js"></script>
<script src="js/common.js"></script>
<script src="js/order-food-confirm.js"></script>
</body>
<span style="display:none;"><script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1255764485'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/z_stat.php%3Fid%3D1255764485%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script></span>
<script>
    _maq.push(['_setMaq', 'order-food-confirm']);
</script>
</html>